﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using BLL.Entities.Company;

namespace HTAProDataImporterTest
{
    [TestClass]
    public class TestCompanies : BaseImporterTest
    {
        [TestMethod]
        public void CheckCompanyFields()
        {
            CompanyInfo comp = data_importer.store.Companies["-1618737140"] as CompanyInfo;

            Assert.IsNotNull(comp, "Company is null");
            Assert.AreEqual(comp.LegalName, "Owen Chambers Paralegal professional corporation");
            Assert.AreEqual(comp.Name, "Owen Chambers Paralegal");

            CompanyOffice off = comp.Offices[0];
            Assert.IsNotNull(off, "Company office is null");

            Assert.AreEqual(off.Address.AddressLine, "5200 Finch Ave, East, Suite 314");
            Assert.AreEqual(off.Address.City, "Toronto");
            Assert.AreEqual(off.Address.Province, "ON");
            Assert.AreEqual(off.Address.PostalCode, "M1S 4Z5");

            Assert.AreEqual(off.Contact.PhoneWork, "(416) 412-0308");
            Assert.AreEqual(off.Contact.Fax, "(416) 291-0564");
            Assert.AreEqual(off.Contact.Email, "owenchambers@bellnet.ca");

        }
    }
}
